package com.lykj.modules.shop.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lykj.modules.shop.entity.StoreProduct;
import com.lykj.modules.shop.excel.StoreProductExcel;
import com.lykj.modules.shop.vo.StoreProductVO;
import com.lykj.modules.shop.mapper.StoreProductMapper;
import com.lykj.modules.shop.service.StoreProductService;
import com.lykj.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * 平台商品表 服务实现类
 *
 * @author cxl
 * @since 2022-01-13
 */
@Service
public class StoreProductServiceImpl extends BaseServiceImpl<StoreProductMapper, StoreProduct> implements StoreProductService {

	@Override
	public IPage<StoreProductVO> selectStoreProductPage(IPage<StoreProductVO> page, StoreProductVO storeProduct) {
		return page.setRecords(baseMapper.selectStoreProductPage(page, storeProduct));
	}

	@Override
	public List<StoreProductExcel> export(QueryWrapper<StoreProduct> queryWrapper){
		return baseMapper.export(queryWrapper);
	}

	@Override
	public int updateReserveAndSales(Long id,int count){
		return baseMapper.updateReserveAndSales(id,count);
	}
}
